﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace JetRetail.support
{
    public class Utils
    {
        /// <summary>
        /// Установить стиль подсветки на строку 
        /// </summary>
        /// <param name="row">строка</param>
        /// <param name="style">стиль</param>
        public static void SetCellStyle(DataGridViewRow row, DataGridViewCellStyle style)
        {
            foreach (DataGridViewTextBoxCell cell in row.Cells)
            {
                cell.Style = style;
            }
        }

        public static void ClearSafe(DataGridView grid)
        {
            /*
            var cols = grid.Columns.Cast<DataGridViewColumn>().ToArray();
            grid.DataSource = null;
            grid.Columns.Clear();
            grid.Columns.AddRange(cols);
            */
        }



    }
}
